import { createStore } from 'vuex'
import router from "./router/router"
import message from "./medicine/message"
import supplier from "./medicine/supplier"
import process from "./medicine/process"
import purchase from "./medicine/purchase"
import stock from "./medicine/stock"
import createTreat from "./treat/createTreat"
import treatList from "./treat/treatList"
import doctorScheduling from "./treat/doctorScheduling"
import registerTreat from "./treat/registerTreat"
import registerList from "./treat/registerList"
import patientList from "./treat/patientList"
import chargeDispensing from "./chargeDispensing/chargeDispensing"
import doctor from "./setting/doctor"
import department from "./setting/department"
import register from "./setting/register"
import prescription from "./setting/prescription"
import checkProject from "./setting/checkProject"
import dictionaryTable from "./setting/dictionaryTable"
import clinicMessage from "./setting/clinicMessage"
import thirdParty from "./setting/thirdParty"
import log from "./setting/log"
import createPersistedstate from 'vuex-persistedstate' 



export default createStore({
  modules: {
    router,
    message,
    supplier,
    process,
    purchase,
    stock,
    createTreat,
    treatList,
    doctorScheduling,
    registerTreat,
    registerList,
    patientList,
    chargeDispensing,
    doctor,
    department,
    register,
    prescription,
    checkProject,
    dictionaryTable,
    clinicMessage,
    thirdParty,
    log

  },
  plugins:[createPersistedstate({ 
    storage:window.sessionStorage //指定存储的位置，默认是 localStorgae 
    })]

})
